import echarts from "echarts";
const install = function (Vue) {
    Object.defineProperties(Vue.prototype, {
        $chart: {
            get() {
                return {
                    //总 节约 电量和行为次数 
                    line1: function (id) {
                        this.chart = echarts.init(document.getElementById(id));
                        this.chart.clear();
                        const option = {
                            tooltip: {
                                trigger: "axis",
                                axisPointer: {
                                    type: "cross",
                                    crossStyle: {
                                        color: "#999"
                                    }
                                }
                            },
                            toolbox: {
                                feature: {
                                    magicType: { show: true, type: ["line", "bar"] },
                                    restore: { show: true },
                                    saveAsImage: { show: true }
                                }
                            },
                            legend: {
                                textStyle: {
                                    fontSize: 12,
                                },
                                // data: ["节约电量", "节约行为次数"]
                                data: [{
                                    name: "节约电量",
                                    textStyle: {
                                        color: "#00d5dc"
                                    }
                                }, {
                                    name: "节约行为次数",
                                    textStyle: {
                                        color: "#c23531"
                                    }
                                }]
                            },
                            xAxis: [
                                {
                                    nameTextStyle: {
                                        color: "#FFFFFF",
                                        padding: [5, 0, 0, 0]
                                    },
                                    type: "category",
                                    axisLine: {

                                        lineStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },
                                    data: [
                                        {
                                            value: "1月",
                                        },
                                        {
                                            value: "2月",
                                        },
                                        {
                                            value: "3月",
                                        },
                                        {
                                            value: "4月",
                                        },
                                        {
                                            value: "5月",
                                        },
                                        {
                                            value: "6月",

                                        },
                                        {
                                            value: "7月",

                                        },
                                        {
                                            value: "8月",

                                        },
                                        {
                                            value: "9月",

                                        },
                                        {
                                            value: "10月",

                                        },
                                        {
                                            value: "11月",

                                        },
                                        {
                                            value: "12月",

                                        }
                                    ],
                                    axisPointer: {
                                        type: "shadow"
                                    }
                                }
                            ],
                            yAxis: [
                                {
                                    name: "电量",
                                    nameTextStyle: {
                                        color: "black",
                                        padding: [5, 0, 0, 0]
                                    },
                                    type: "value",
                                    axisLine: {
                                        lineStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },

                                    min: 0,
                                    max: 250,
                                    interval: 50,
                                    axisLabel: {
                                        color: "#00d5dc",
                                        formatter: "{value} 千瓦时",
                                    }
                                },
                                {
                                    nameTextStyle: {
                                        color: "black",
                                        padding: [5, 0, 0, 0]
                                    },
                                    axisLine: {
                                        lineStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },
                                    type: "value",
                                    name: "次数",
                                    min: 0,
                                    max: 25,
                                    interval: 5,
                                    axisLabel: {
                                        formatter: "{value} 百次",
                                        color: "#c23531"
                                    }
                                }
                            ],
                            series: [
                                {
                                    name: "节约电量",
                                    color: ["#00D5DC"],
                                    type: "bar",
                                    barWidth: "32%",
                                    data: [
                                        2.6,
                                        5.9,
                                        9.0,
                                        26.4,
                                        28.7,
                                        70.7,
                                        175.6,
                                        182.2,
                                        48.7,
                                        18.8,
                                        6.0,
                                        2.3
                                    ]
                                },
                                {
                                    name: "节约行为次数",
                                    type: "line",
                                    yAxisIndex: 1,
                                    data: [
                                        2.0,
                                        2.2,
                                        3.3,
                                        4.5,
                                        6.3,
                                        10.2,
                                        20.3,
                                        23.4,
                                        23.0,
                                        16.5,
                                        12.0,
                                        6.2
                                    ]
                                }
                            ]
                        };
                        this.chart.setOption(option);
                    },
                    // 告警类型
                    line2: function (id) {
                        this.chart = echarts.init(document.getElementById(id));
                        this.chart.clear();
                        const option = {
                            title: {
                                text: "告警类型",
                                left: "center",
                                top: 0,
                                textStyle: {
                                    color: "black"
                                }
                            },
                            color: ["#FCCE35", "#FA75C4", "#B367FF"],
                            tooltip: {
                                trigger: "item",
                                formatter: "{a} <br/>{b}: {c} ({d}%)",

                            },
                            legend: {
                                textStyle: {
                                    fontSize: 11,
                                    color: "black"
                                },
                                orient: "vertical",
                                left: -5,
                                top: -5


                            },
                            series: [
                                {
                                    name: "操作类型",
                                    type: "pie",
                                    radius: ["50%", "70%"],
                                    avoidLabelOverlap: false,
                                    label: {
                                        show: false,
                                        position: "center"
                                    },
                                    // 图标中间的文字
                                    emphasis: {
                                        label: {
                                            show: true,
                                            fontSize: "12",
                                            fontWeight: "bold",
                                        }
                                    },
                                    labelLine: {
                                        show: false
                                    },
                                    data: [
                                        { value: 335, name: "高温告警", index: 1 },
                                        { value: 310, name: "过流告警", index: 2 },
                                        { value: 234, name: "低电量告警", index: 3 },
                                        { value: 234, name: "过压告警", index: 4 },
                                    ]
                                }
                            ]
                        };
                        this.chart.setOption(option);
                        // 跳转到相应页面
                        this.chart.on('click', function (params) {
                            if (params.data.index == 1) {
                                window.location.href = "http://localhost:8081/alerts?type=temperature";
                            } else if (params.data.index == 2) {
                                window.location.href = "http://localhost:8081/alerts?type=electricity";
                            } else if (params.data.index == 3) {
                                window.location.href = "http://localhost:8081/alerts?type=power";
                            } else if (params.data.index == 4) {
                                window.location.href = "http://localhost:8081/alerts?type=pressure";
                                // window.open("http://localhost:8081/alerts?type=pressure")
                            }
                        })

                    },
                    // 各时间段车辆进入次数
                    line3: function (id) {
                        this.chart = echarts.init(document.getElementById(id));
                        this.chart.clear();
                        const option = {

                            title: {
                                left: "center",
                                text: "各时间段车辆进入次数",
                                textStyle: {
                                    color: "black"
                                }
                            },
                            tooltip: {
                                show: true,
                                trigger: "axis",
                                axisPointer: {
                                    // 坐标轴指示器，坐标轴触发有效
                                    type: "shadow" // 默认为直线，可选为：'line' | 'shadow'
                                }
                            },

                            xAxis: [
                                {
                                    name: "时间(单位:小时)",
                                    nameLocation: "end",
                                    axisLine: {
                                        lineStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },
                                    type: "category",

                                    data: [
                                        {
                                            value: "1",

                                        },
                                        {
                                            value: "2",

                                        },
                                        {
                                            value: "3",

                                        },
                                        {
                                            value: "4",

                                        },
                                        {
                                            value: "5",

                                        },
                                        {
                                            value: "6",
                                        },
                                        {
                                            value: "7",
                                        },
                                        {
                                            value: "8",
                                        },
                                        {
                                            value: "9",
                                        },
                                        {
                                            value: "10",
                                        },
                                        {
                                            value: "11",
                                        },
                                        {
                                            value: "12",
                                        },
                                        {
                                            value: "13",
                                        },
                                        {
                                            value: "14",
                                        },
                                        {
                                            value: "15",
                                        },
                                        {
                                            value: "16",
                                        },
                                        {
                                            value: "17",
                                        },
                                        {
                                            value: "18",
                                        },
                                        {
                                            value: "19",
                                        },
                                        {
                                            value: "20",
                                        },
                                        {
                                            value: "21",
                                        },
                                        {
                                            value: "22",
                                        },
                                        {
                                            value: "23",
                                        },
                                        {
                                            value: "24",
                                        },


                                    ],
                                    axisLabel: {
                                        // show :false,
                                        align: "right",
                                        padding: [5, -24, 0, 0]
                                    },

                                    nameTextStyle: {
                                        color: "black",
                                        padding: [5, 0, 0, 0]
                                    }
                                }
                            ],
                            yAxis: [
                                {
                                    name: "次数",
                                    nameGap: 15,
                                    nameTextStyle: {
                                        color: "red"
                                    },
                                    axisLine: {
                                        lineStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },
                                    type: "value",
                                    nameLocation: "end",
                                    axisLabel: {
                                        textStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },
                                    nameTextStyle: {
                                        color: "black"
                                    }
                                }
                            ],
                            series: [
                                {
                                    data: [820, 932, 901, 934, 1290, 1330, 1320],
                                    type: 'bar',
                                    barWidth: "30%",
                                    itemStyle: {
                                        normal: {
                                            color: '#4CA6F4 '
                                        }
                                    }
                                }
                            ]
                        };

                        this.chart.setOption(option);
                    },

                    // 单个台区
                    //单个台区 总设备数
                    line4: function (id) {
                        this.chart = echarts.init(document.getElementById(id));
                        this.chart.clear();
                        const option = {
                            title: {
                                text: "总设备数",
                                left: "center",
                                top: 0,
                                textStyle: {
                                    color: "black"
                                }
                            },

                            tooltip: {
                                trigger: "item",
                                formatter: "{a} <br/>{b} : {c} ({d}%)"
                            },

                            visualMap: {
                                show: false,
                                min: 80,
                                max: 600,
                                inRange: {
                                    colorLightness: [0, 1]
                                }
                            },
                            series: [
                                {
                                    name: "访问来源",
                                    type: "pie",
                                    radius: "55%",
                                    center: ["50%", "50%"],
                                    data: [
                                        { value: 335, name: "光照传感器" },
                                        { value: 310, name: "人体感应器" },
                                        { value: 274, name: "智能配电箱" },
                                        { value: 235, name: "万能红外" },
                                        { value: 235, name: "插座" },
                                        { value: 235, name: "开关" },
                                    ].sort(function (a, b) {
                                        return a.value - b.value;
                                    }),
                                    roseType: "radius",
                                    label: {
                                        color: "black"
                                    },
                                    labelLine: {
                                        lineStyle: {
                                            color: "black"
                                        },
                                        smooth: 0.2,
                                        length: 10,
                                        length2: 20
                                    },
                                    color: ["#4E70F0", "#00C5D2", "#FF812C", "FF5A5A"],
                                    // itemStyle: {
                                    //   color: "#65318e",
                                    //   shadowBlur: 200,
                                    //   shadowColor: "rgba(0, 0, 0, 0.5)"
                                    // },

                                    animationType: "scale",
                                    animationEasing: "elasticOut",
                                    // animationDelay: function (idx) {
                                    //   console.log(idx);
                                    //   return Math.random() * 200;
                                    // }
                                }
                            ]
                        };
                        this.chart.setOption(option);
                    },
                    // 台区房间用电情况(度)
                    line5: function (id) {
                        this.chart = echarts.init(document.getElementById(id));
                        this.chart.clear();
                        const option = {
                            title: {
                                text: "台区房间用电情况(度)",
                                left: "center",
                                top: 0,
                                textStyle: {
                                    color: "black"
                                }
                            },

                            tooltip: {
                                trigger: "item",
                                formatter: "{a} <br/>{b} : {c} ({d}%)"
                            },

                            visualMap: {
                                show: false,
                                min: 80,
                                max: 600,
                                inRange: {
                                    colorLightness: [0, 1]
                                }
                            },
                            series: [
                                {
                                    name: "用电",
                                    type: "pie",
                                    radius: "55%",
                                    center: ["50%", "50%"],
                                    data: [
                                        { value: 335, name: "办公室一", index: 1 },
                                        { value: 310, name: "办公室二", index: 2 },
                                        { value: 274, name: "厕所", index: 3 },
                                        { value: 235, name: "超市", index: 4 }
                                    ].sort(function (a, b) {
                                        return a.value - b.value;
                                    }),
                                    roseType: "radius",
                                    label: {
                                        color: "black"
                                    },
                                    labelLine: {
                                        lineStyle: {
                                            color: "black"
                                        },
                                        smooth: 0.2,
                                        length: 10,
                                        length2: 20
                                    },
                                    color: ["#4E70F0", "#00C5D2", "#FF812C", "FF5A5A"],
                                    // itemStyle: {
                                    //   color: "#65318e",
                                    //   shadowBlur: 200,
                                    //   shadowColor: "rgba(0, 0, 0, 0.5)"
                                    // },

                                    animationType: "scale",
                                    animationEasing: "elasticOut",
                                    // animationDelay: function (idx) {
                                    //   console.log(idx);
                                    //   return Math.random() * 200;
                                    // }
                                }
                            ]
                        };
                        this.chart.setOption(option);
                        // 跳转到相应页面
                        this.chart.on('click', function (params) {
                            console.log(params);

                            if (params.data.index == 1) {
                                window.location.href = "http://localhost:8081/room"
                            } else if (params.data.index == 2) {
                                window.location.href = "http://localhost:8081/room"
                            } else if (params.data.index == 3) {
                                window.location.href = "http://localhost:8081/room"
                            } else if (params.data.index == 4) {
                                window.location.href = "http://localhost:8081/room"
                            }
                        })
                    },
                    //单个台区 节约 电量和行为次数 
                    line6: function (id) {
                        this.chart = echarts.init(document.getElementById(id));
                        this.chart.clear();
                        const option = {
                            tooltip: {
                                trigger: "axis",
                                axisPointer: {
                                    type: "cross",
                                    crossStyle: {
                                        color: "#999"
                                    }
                                }
                            },
                            toolbox: {
                                feature: {
                                    magicType: { show: true, type: ["line", "bar"] },
                                    restore: { show: true },
                                    saveAsImage: { show: true }
                                }
                            },
                            legend: {
                                textStyle: {
                                    fontSize: 12,
                                },
                                // data: ["节约电量", "节约行为次数"]
                                data: [{
                                    name: "节约电量",
                                    textStyle: {
                                        color: "#00d5dc"
                                    }
                                }, {
                                    name: "节约行为次数",
                                    textStyle: {
                                        color: "#c23531"
                                    }
                                }]
                            },
                            xAxis: [
                                {
                                    nameTextStyle: {
                                        color: "#FFFFFF",
                                        padding: [5, 0, 0, 0]
                                    },
                                    type: "category",
                                    axisLine: {

                                        lineStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },
                                    data: [
                                        {
                                            value: "1月",
                                        },
                                        {
                                            value: "2月",
                                        },
                                        {
                                            value: "3月",
                                        },
                                        {
                                            value: "4月",
                                        },
                                        {
                                            value: "5月",
                                        },
                                        {
                                            value: "6月",

                                        },
                                        {
                                            value: "7月",

                                        },
                                        {
                                            value: "8月",

                                        },
                                        {
                                            value: "9月",

                                        },
                                        {
                                            value: "10月",

                                        },
                                        {
                                            value: "11月",

                                        },
                                        {
                                            value: "12月",

                                        }
                                    ],
                                    axisPointer: {
                                        type: "shadow"
                                    }
                                }
                            ],
                            yAxis: [
                                {
                                    name: "电量",
                                    nameTextStyle: {
                                        color: "black",
                                        padding: [5, 0, 0, 0]
                                    },
                                    type: "value",
                                    axisLine: {
                                        lineStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },

                                    min: 0,
                                    max: 250,
                                    interval: 50,
                                    axisLabel: {
                                        color: "#00d5dc",
                                        formatter: "{value} 千瓦时",
                                    }
                                },
                                {
                                    nameTextStyle: {
                                        color: "black",
                                        padding: [5, 0, 0, 0]
                                    },
                                    axisLine: {
                                        lineStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },
                                    type: "value",
                                    name: "次数",
                                    min: 0,
                                    max: 25,
                                    interval: 5,
                                    axisLabel: {
                                        formatter: "{value} 百次",
                                        color: "#c23531"
                                    }
                                }
                            ],
                            series: [
                                {
                                    name: "节约电量",
                                    color: ["#00D5DC"],
                                    type: "bar",
                                    barWidth: "32%",
                                    data: [
                                        2.6,
                                        5.9,
                                        9.0,
                                        26.4,
                                        28.7,
                                        70.7,
                                        175.6,
                                        182.2,
                                        48.7,
                                        18.8,
                                        6.0,
                                        2.3
                                    ]
                                },
                                {
                                    name: "节约行为次数",
                                    type: "line",
                                    yAxisIndex: 1,
                                    data: [
                                        2.0,
                                        2.2,
                                        3.3,
                                        4.5,
                                        6.3,
                                        10.2,
                                        20.3,
                                        23.4,
                                        23.0,
                                        16.5,
                                        12.0,
                                        6.2
                                    ]
                                }
                            ]
                        };
                        this.chart.setOption(option);
                    },
                    //单个台区 告警类型
                    line7: function (id) {
                        this.chart = echarts.init(document.getElementById(id));
                        this.chart.clear();
                        const option = {
                            title: {
                                text: "告警类型",
                                left: "center",
                                top: 0,
                                textStyle: {
                                    color: "black"
                                }
                            },
                            color: ["#FCCE35", "#FA75C4", "#B367FF"],
                            tooltip: {
                                trigger: "item",
                                formatter: "{a} <br/>{b}: {c} ({d}%)",

                            },
                            legend: {
                                textStyle: {
                                    fontSize: 11,
                                    color: "black"
                                },
                                orient: "vertical",
                                left: 0

                            },
                            series: [
                                {
                                    name: "操作类型",
                                    type: "pie",
                                    radius: ["50%", "70%"],
                                    avoidLabelOverlap: false,
                                    label: {
                                        show: false,
                                        position: "center"
                                    },
                                    // 图标中间的文字
                                    emphasis: {
                                        label: {
                                            show: true,
                                            fontSize: "12",
                                            fontWeight: "bold",
                                        }
                                    },
                                    labelLine: {
                                        show: false
                                    },
                                    data: [
                                        { value: 335, name: "高温告警", index: 1 },
                                        { value: 310, name: "过流告警", index: 2 },
                                        { value: 234, name: "低电量告警", index: 3 },
                                        { value: 234, name: "过压告警", index: 4 },
                                    ]
                                }
                            ]
                        };
                        this.chart.setOption(option);
                        // 跳转到相应页面
                        this.chart.on('click', function (params) {
                            if (params.data.index == 1) {
                                window.location.href = "http://localhost:8081/alerts?type=temperature";
                            } else if (params.data.index == 2) {
                                window.location.href = "http://localhost:8081/alerts?type=electricity";
                            } else if (params.data.index == 3) {
                                window.location.href = "http://localhost:8081/alerts?type=power";
                            } else if (params.data.index == 4) {
                                window.location.href = "http://localhost:8081/alerts?type=pressure";
                                // window.open("http://localhost:8081/alerts?type=pressure")
                            }
                        })

                    },
                    //单个台区 各时间段车辆进入次数
                    line8: function (id) {
                        this.chart = echarts.init(document.getElementById(id));
                        this.chart.clear();
                        const option = {

                            title: {
                                left: "center",
                                text: "各时间段车辆进入次数",
                                textStyle: {
                                    color: "black"
                                }
                            },
                            tooltip: {
                                show: true,
                                trigger: "axis",
                                axisPointer: {
                                    // 坐标轴指示器，坐标轴触发有效
                                    type: "shadow" // 默认为直线，可选为：'line' | 'shadow'
                                }
                            },

                            xAxis: [
                                {
                                    name: "时间(单位:小时)",
                                    nameLocation: "end",
                                    axisLine: {
                                        lineStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },
                                    type: "category",

                                    data: [
                                        {
                                            value: "1",

                                        },
                                        {
                                            value: "2",

                                        },
                                        {
                                            value: "3",

                                        },
                                        {
                                            value: "4",

                                        },
                                        {
                                            value: "5",

                                        },
                                        {
                                            value: "6",
                                        },
                                        {
                                            value: "7",
                                        },
                                        {
                                            value: "8",
                                        },
                                        {
                                            value: "9",
                                        },
                                        {
                                            value: "10",
                                        },
                                        {
                                            value: "11",
                                        },
                                        {
                                            value: "12",
                                        },
                                        {
                                            value: "13",
                                        },
                                        {
                                            value: "14",
                                        },
                                        {
                                            value: "15",
                                        },
                                        {
                                            value: "16",
                                        },
                                        {
                                            value: "17",
                                        },
                                        {
                                            value: "18",
                                        },
                                        {
                                            value: "19",
                                        },
                                        {
                                            value: "20",
                                        },
                                        {
                                            value: "21",
                                        },
                                        {
                                            value: "22",
                                        },
                                        {
                                            value: "23",
                                        },
                                        {
                                            value: "24",
                                        },


                                    ],
                                    axisLabel: {
                                        // show :false,
                                        align: "right",
                                        padding: [5, -24, 0, 0]
                                    },

                                    nameTextStyle: {
                                        color: "black",
                                        padding: [5, 0, 0, 0]
                                    }
                                }
                            ],
                            yAxis: [
                                {
                                    name: "次数",
                                    nameGap: 15,
                                    nameTextStyle: {
                                        color: "red"
                                    },
                                    axisLine: {
                                        lineStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },
                                    type: "value",
                                    nameLocation: "end",
                                    axisLabel: {
                                        textStyle: {
                                            color: "#B2B2B2"
                                        }
                                    },
                                    nameTextStyle: {
                                        color: "black"
                                    }
                                }
                            ],
                            series: [
                                {
                                    data: [820, 932, 901, 934, 1290, 1330, 1320],
                                    type: 'bar',
                                    barWidth: "30%",
                                    itemStyle: {
                                        normal: {
                                            color: '#4CA6F4 '
                                        }
                                    }
                                }
                            ]
                        };

                        this.chart.setOption(option);
                    },

                    // 房间详情
                    // 房间详情 设备 左
                    houseEquipmentBar: function (id) {
                        this.chart = echarts.init(document.getElementById(id));
                        this.chart.clear();
                        const option = {
                            title: {
                                text: '设备',
                                top: 10,
                                textStyle: {
                                    color: 'black',

                                }
                            },
                            tooltip: {
                                trigger: 'axis',
                                axisPointer: {
                                    type: 'shadow'
                                }
                            },

                            grid: {
                                left: '3%',
                                right: '8%',
                                bottom: '3%',
                                containLabel: true
                            },
                            xAxis: {
                                type: 'value',
                                name: '个',
                                nameTextStyle: {
                                    color: 'black'
                                },
                                splitLine: {
                                    show: false
                                },
                                axisLine: {
                                    lineStyle: {
                                        color: "rgba(0,0,0,.3)"
                                    }
                                },
                                axisTick: {
                                    show: false
                                },
                                axisLabel: {
                                    color: 'black'
                                }
                            },
                            yAxis: {
                                type: 'category',
                                data: ['光照传感器', '人体感应器', '智能配电箱', '万能红外', '插座', '开光'],
                                axisLine: {
                                    lineStyle: {
                                        color: "rgba(0,0,0,.3)"
                                    }
                                },
                                axisTick: {
                                    show: false
                                },
                                axisLabel: {
                                    color: 'black'
                                }

                            },
                            series: [
                                {
                                    name: '2011年',
                                    type: 'bar',
                                    data: [18, 23, 29, 10, 13, 6],
                                    itemStyle: {
                                        color: '#4CA6F4',
                                    }
                                },

                            ]
                        };
                        this.chart.setOption(option);

                    },
                    // 房间详情 房间 中
                    houseBar: function (id) {
                        this.chart = echarts.init(document.getElementById(id));
                        this.chart.clear();
                        const option = {
                            title: {
                                text: '房间',
                                textStyle: {
                                    color: 'black',
                                }
                            },
                            tooltip: {
                                trigger: 'axis'
                            },
                            legend: {
                                textStyle: {
                                    color: "black"
                                }
                            },
                            grid: {
                                left: '3%',
                                right: '4%',
                                bottom: '3%',
                                containLabel: true
                            },
                            toolbox: {
                                feature: {
                                    saveAsImage: {}
                                }
                            },
                            xAxis: {
                                type: 'category',
                                boundaryGap: false,
                                data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
                                nameTextStyle: {
                                    color: 'black'
                                },
                                splitLine: {
                                    show: false
                                },
                                axisLine: {
                                    lineStyle: {
                                        color: "rgba(0,0,0,.3)"
                                    }
                                },
                                axisTick: {
                                    show: false
                                },
                                axisLabel: {
                                    color: 'black'
                                }
                            },
                            yAxis: {
                                type: 'value',
                                axisLine: {
                                    lineStyle: {
                                        color: "rgba(0,0,0,.3)"
                                    }
                                },
                                axisTick: {
                                    show: false
                                },
                                axisLabel: {
                                    color: 'black'
                                },
                                splitLine: {
                                    show: false
                                },

                            },
                            series: [
                                {
                                    name: '有人',
                                    type: 'line',
                                    stack: '总量',
                                    data: [120, 132, 101, 134, 90, 230, 210]
                                },
                                {
                                    name: '无人',
                                    type: 'line',
                                    stack: '总量',
                                    data: [220, 182, 191, 234, 290, 330, 310]
                                },
                                {
                                    name: '空凋开启时间',
                                    type: 'line',
                                    stack: '总量',
                                    data: [150, 232, 201, 154, 190, 330, 410]
                                },


                            ]
                        };

                        this.chart.setOption(option);

                    },
                }
            }
        }
    })
}




export default {
    install
};